package stringStudy;

/**
 * 复习String StringBuffer StringBuilder的区别
 *
 */
public class StringStudy01 {

    public static void main(String[] args) {
        char c = '种';
        System.out.println(c);
        //直接赋值为中文报错，但是英文可以
        byte b = 'a';
        //byte赋值给字符会报错，需要强转
        c = (char) b;
        System.out.println(c);
        System.out.println("============");
        //字符可以直接赋值为int类型
        int i = '种';
        System.out.println(i);
        System.out.println("=============");
        //int类型也可以直接赋值给字符
        char c2 = 31181;
        System.out.println(c2);
        System.out.println("==========");
    }
}
